#ifndef SL_DRAW_STATE_LEAF_H_
#define SL_DRAW_STATE_LEAF_H_
#include "Config.h"
#include "Referenced.h"
namespace sl
{
	class Drawable;
	class Matrix4;
	class StateGraph;
	class SL_EXPORT StateLeaf : public Referenced
	{
	public:
		inline StateLeaf(sl::Drawable * drawable, sl::Matrix4 * projection, sl::Matrix4 * moedelview, float fDepth )
			:m_pParent(0)
			,m_pDrawable(drawable)
			,m_mModelView(moedelview)
			,m_mProjection(projection)
			,m_fDepth(fDepth)
		{

		}
		~StateLeaf(void)
		{

		}

		inline void set( sl::Drawable * drawable, sl::Matrix4 * projection, sl::Matrix4 * moedelview, float fDepth )
		{
			m_pParent = 0;
			m_pDrawable = drawable;
			m_mModelView = projection;
			m_mProjection = moedelview;
			m_fDepth = fDepth;
		}

		inline void reset()
		{
			m_pParent = 0;
			m_pDrawable = 0;
			m_mModelView = 0;
			m_mProjection = 0;
			m_fDepth = 0;
		}

	public:

		StateGraph *		m_pParent;
		Drawable *				m_pDrawable;
		float					m_fDepth;

		Matrix4	*				m_mModelView;
		Matrix4	*				m_mProjection;
	private:

		StateLeaf()
			:m_pParent(0)
			,m_pDrawable(0)
			,m_mModelView(0)
			,m_mProjection(0)
			,m_fDepth(0)

		{

		}


	};

}

#endif
